.class public final Lnet/tsapps/topdeals/a/n;
.super Landroid/widget/BaseExpandableListAdapter;


# instance fields
.field public a:Lnet/tsapps/topdeals/e/b;

.field private b:Landroid/view/LayoutInflater;

.field private c:Ljava/util/List;

.field private d:Ljava/util/List;


# direct methods
.method public constructor <init>(Landroid/view/LayoutInflater;Lnet/tsapps/topdeals/e/b;Ljava/util/List;Ljava/util/List;)V
    .locals 0

    invoke-direct {p0}, Landroid/widget/BaseExpandableListAdapter;-><init>()V

    iput-object p1, p0, Lnet/tsapps/topdeals/a/n;->b:Landroid/view/LayoutInflater;

    iput-object p2, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    iput-object p3, p0, Lnet/tsapps/topdeals/a/n;->c:Ljava/util/List;

    iput-object p4, p0, Lnet/tsapps/topdeals/a/n;->d:Ljava/util/List;

    return-void
.end method

.method private a(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Location;
    .locals 7

    iget-object v0, p0, Lnet/tsapps/topdeals/a/n;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_1

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_1
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Region;

    iget-object v0, v0, Lnet/tsapps/topdeals/objects/Region;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_2
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Location;

    iget-wide v3, v0, Lnet/tsapps/topdeals/objects/Location;->a:J

    invoke-virtual {p1}, Ljava/lang/Long;->longValue()J

    move-result-wide v5

    cmp-long v3, v3, v5

    if-nez v3, :cond_2

    goto :goto_0
.end method

.method private b(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Dealer;
    .locals 6

    iget-object v0, p0, Lnet/tsapps/topdeals/a/n;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_1

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_1
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Dealer;

    iget-wide v2, v0, Lnet/tsapps/topdeals/objects/Dealer;->b:J

    invoke-virtual {p1}, Ljava/lang/Long;->longValue()J

    move-result-wide v4

    cmp-long v2, v2, v4

    if-nez v2, :cond_0

    goto :goto_0
.end method


# virtual methods
.method public final getChild(II)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/e/b;->c()Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-direct {p0, v0}, Lnet/tsapps/topdeals/a/n;->a(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Location;

    move-result-object v0

    iget-object v0, v0, Lnet/tsapps/topdeals/objects/Location;->c:Ljava/util/List;

    invoke-interface {v0, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-direct {p0, v0}, Lnet/tsapps/topdeals/a/n;->b(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Dealer;

    move-result-object v0

    return-object v0
.end method

.method public final getChildId(II)J
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/e/b;->c()Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-direct {p0, v0}, Lnet/tsapps/topdeals/a/n;->a(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Location;

    move-result-object v0

    iget-object v0, v0, Lnet/tsapps/topdeals/objects/Location;->c:Ljava/util/List;

    invoke-interface {v0, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-direct {p0, v0}, Lnet/tsapps/topdeals/a/n;->b(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Dealer;

    move-result-object v0

    iget-wide v0, v0, Lnet/tsapps/topdeals/objects/Dealer;->b:J

    return-wide v0
.end method

.method public final getChildView(IIZLandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 8

    invoke-virtual {p0, p1}, Lnet/tsapps/topdeals/a/n;->getGroup(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Location;

    invoke-virtual {p0, p1, p2}, Lnet/tsapps/topdeals/a/n;->getChild(II)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lnet/tsapps/topdeals/objects/Dealer;

    if-nez p4, :cond_0

    iget-object v2, p0, Lnet/tsapps/topdeals/a/n;->b:Landroid/view/LayoutInflater;

    const v3, 0x7f030014

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout;

    move-object p4, v2

    :cond_0
    const v2, 0x7f050006

    invoke-virtual {p4, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iget-object v3, v1, Lnet/tsapps/topdeals/objects/Dealer;->a:Ljava/lang/String;

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const v2, 0x7f050037

    invoke-virtual {p4, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iget-object v3, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    iget-wide v4, v0, Lnet/tsapps/topdeals/objects/Location;->a:J

    iget-wide v6, v1, Lnet/tsapps/topdeals/objects/Dealer;->b:J

    invoke-virtual {v3, v4, v5, v6, v7}, Lnet/tsapps/topdeals/e/b;->a(JJ)Z

    move-result v3

    if-eqz v3, :cond_1

    const v3, 0x7f020037

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    :goto_0
    new-instance v2, Lnet/tsapps/topdeals/a/c;

    invoke-direct {v2, p0, v0, v1}, Lnet/tsapps/topdeals/a/c;-><init>(Lnet/tsapps/topdeals/a/n;Lnet/tsapps/topdeals/objects/Location;Lnet/tsapps/topdeals/objects/Dealer;)V

    invoke-virtual {p4, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-object p4

    :cond_1
    const v3, 0x7f020036

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_0
.end method

.method public final getChildrenCount(I)I
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/e/b;->c()Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-direct {p0, v0}, Lnet/tsapps/topdeals/a/n;->a(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Location;

    move-result-object v0

    iget-object v0, v0, Lnet/tsapps/topdeals/objects/Location;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public final getGroup(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/e/b;->c()Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-direct {p0, v0}, Lnet/tsapps/topdeals/a/n;->a(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Location;

    move-result-object v0

    return-object v0
.end method

.method public final getGroupCount()I
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/e/b;->c()Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public final getGroupId(I)J
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/e/b;->c()Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Long;

    invoke-direct {p0, v0}, Lnet/tsapps/topdeals/a/n;->a(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Location;

    move-result-object v0

    iget-wide v0, v0, Lnet/tsapps/topdeals/objects/Location;->a:J

    return-wide v0
.end method

.method public final getGroupView(IZLandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 8

    const/4 v6, 0x0

    invoke-virtual {p0, p1}, Lnet/tsapps/topdeals/a/n;->getGroup(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lnet/tsapps/topdeals/objects/Location;

    iget-wide v3, v0, Lnet/tsapps/topdeals/objects/Location;->a:J

    if-nez p3, :cond_1

    iget-object v1, p0, Lnet/tsapps/topdeals/a/n;->b:Landroid/view/LayoutInflater;

    const v2, 0x7f030015

    const/4 v5, 0x0

    invoke-virtual {v1, v2, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    move-object v2, v1

    :goto_0
    const v1, 0x7f050006

    invoke-virtual {v2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iget-object v5, v0, Lnet/tsapps/topdeals/objects/Location;->b:Ljava/lang/String;

    invoke-virtual {v1, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    move-object v1, v2

    check-cast v1, Landroid/view/ViewGroup;

    invoke-virtual {v1, v6}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/FrameLayout;

    invoke-virtual {v1, v6}, Landroid/widget/FrameLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    if-eqz p2, :cond_0

    const v5, 0x7f02003b

    invoke-virtual {v1, v5}, Landroid/widget/ImageView;->setImageResource(I)V

    :goto_1
    const v1, 0x7f050039

    invoke-virtual {v2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    new-instance v5, Ljava/lang/StringBuilder;

    iget-object v6, p0, Lnet/tsapps/topdeals/a/n;->a:Lnet/tsapps/topdeals/e/b;

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v7

    invoke-direct {p0, v7}, Lnet/tsapps/topdeals/a/n;->a(Ljava/lang/Long;)Lnet/tsapps/topdeals/objects/Location;

    move-result-object v7

    invoke-virtual {v6, v7}, Lnet/tsapps/topdeals/e/b;->a(Lnet/tsapps/topdeals/objects/Location;)I

    move-result v6

    invoke-static {v6}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "/"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget-object v0, v0, Lnet/tsapps/topdeals/objects/Location;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const v0, 0x7f05003a

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    new-instance v1, Lnet/tsapps/topdeals/a/b;

    invoke-direct {v1, p0, v3, v4}, Lnet/tsapps/topdeals/a/b;-><init>(Lnet/tsapps/topdeals/a/n;J)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-object v2

    :cond_0
    const v5, 0x7f02003a

    invoke-virtual {v1, v5}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_1

    :cond_1
    move-object v2, p3

    goto :goto_0
.end method

.method public final hasStableIds()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public final isChildSelectable(II)Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method
